home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / CC_C / 1116.ZIP / TOOLKIT.ARC / CTYPE.H < prev    next >
Text File  |  1979-12-31  |  707b  |  23 lines

  1.  
  2. /*
  3.   CTYPE.H  written by Wayne Pearson
  4.   This Small C header file converts characters to upper and lower case.
  5.   toupper() converts only to upper case and leaves characters in upper
  6.             case if they already are in upper case.
  7.   tolower() converts only to lower case and leaves characters in lower
  8.             case if they already are in lower case.
  9.   The value passed is of variable type char.
  10. */
  11.  
  12. toupper(ctog)
  13.               char ctog;
  14.             {
  15.               if((ctog >= 'a')&(ctog <= 'z')) ctog = ctog - 'a' + 'A';
  16.             }
  17.  
  18. tolower(ctog)
  19.               char ctog;
  20.             {
  21.               if((ctog >= 'A')&(ctog <= 'Z')) ctog = ctog - 'A' + 'a';
  22.             }
  23.